package com.scsj.supermarket.view.activity.shopmodel;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import com.scsj.supermarket.R;
import com.scsj.supermarket.adapter.ShopClassifyAdapter;
import com.scsj.supermarket.view.activity.baseactivitymodel.BaseActivity;

import java.util.ArrayList;
import java.util.List;


/**
 * 店铺 分类列表
 */
public class ShopClassifyActivity extends BaseActivity implements View.OnClickListener {
    private RecyclerView recyclerview;//分类列表
    private ShopClassifyAdapter shopClassifyAdapter;

    @Override
    protected void createView(Bundle savedInstanceState) {
        setContentView(R.layout.activity_shop_classify);
        initToolbar();
        setToolbarTitle("商品分类");
        hasBack(true);
    }

    @Override
    protected void initView() {
        recyclerview = findViewById(R.id.recyclerview);//分类列表
        recyclerview.setLayoutManager(new LinearLayoutManager(this));
    }

    @Override
    protected void initListener() {
        List<String> list = new ArrayList<>();
        list.add("全部商品");
        list.add("休闲食品");
        list.add("牛奶水饮");
        list.add("个护美妆");
        list.add("母婴");
        list.add("中外名酒");
        list.add("家居清洁");
        list.add("家居生活");
        shopClassifyAdapter = new ShopClassifyAdapter(this, list);
        recyclerview.setAdapter(shopClassifyAdapter);
    }

    @Override
    protected void initData() {

//        shopBrandAdapter = new ShopBrandAdapter(list);

    }


    @Override
    public void onClick(View view) {
        switch (view.getId()) {
//            case R.id.tab_one:
//                finish();
//                break;
            default:
                break;
        }
    }

}
